package com.chukun.rpc.consumer.proxy;

import com.chukun.rpc.api.IRpcComputeService;
import com.chukun.rpc.api.IRpcHelloService;

/**
 * 调用者启动类
 */
public class ConsumerRunner {

    public static void main(String[] args) {
        IRpcHelloService helloService = RpcProxy.create(IRpcHelloService.class);
        System.out.println(helloService.hello("chukun"));

        IRpcComputeService computeService = RpcProxy.create(IRpcComputeService.class);

        System.out.println("8 + 2 = " + computeService.add(8, 2));
        System.out.println("8 - 2 = " + computeService.sub(8, 2));
        System.out.println("8 * 2 = " + computeService.mult(8, 2));
        System.out.println("8 / 2 = " + computeService.div(8, 2));

    }
}
